import request from '@/utils/request'

const menuApi = {
  lists: '/api/v2/menus'
}

export function getMenuLists (paramter) {
  return request({
    url: menuApi.lists,
    method: 'get',
    params: paramter
  })
}

export function deleteMenu (id) {
  return request({
    url: menuApi.lists + '/' + id,
    method: 'delete'
  })
}

export function updateMenu (id, data) {
  return request({
    url: menuApi.lists + '/' + id,
    method: 'put',
    data: data
  })
}
